package com.heisenhub.eureka.config;

import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * @author sen
 * @description
 * @date 2024/3/19 14:36
 */
@EnableWebSecurity
public class HubEurekaWebSecurityConfigure extends WebSecurityConfigurerAdapter {

    /**
     *   用于开启Eureka服务端端点保护。
     * @param http
     * @throws Exception
     */
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.csrf().ignoringAntMatchers("/eureka/**");
        super.configure(http);
    }
}
